with Ada.Text_IO;

with Bulletins;
with Bulletins.Io;



procedure adacalc16 is
   b : Bulletins.Bulletin;

   procedure test(b : in out Bulletins.Bulletin) is
   begin
      b := Bulletins.Enregistrer(b, "Ada");
      Bulletins.Ponderer(b, "Ada", 5);
      Bulletins.SimulerNoteMatiere(b, "Ada", 1200);
      b := Bulletins.Enregistrer(b, "PASD");
      Bulletins.Ponderer(b, "PASD", 5);
      Bulletins.SimulerNoteMatiere(b, "PASD", 1300);
      b := Bulletins.Enregistrer(b, "Algo");
      Bulletins.Ponderer(b, "Algo", 4);
      Bulletins.SimulerNoteMatiere(b, "Algo", 1200);

      b := Bulletins.Enregistrer(b, "Maths");
      Bulletins.Ponderer(b, "Maths", 3);
      Bulletins.AttribuerNoteMatiere(b, "Maths", 0800);
      b := Bulletins.Enregistrer(b, "Proba");
      Bulletins.Ponderer(b, "Proba", 3);
      Bulletins.AttribuerNoteMatiere(b, "Proba", 0900);
      b := Bulletins.Enregistrer(b, "Stats");
      Bulletins.Ponderer(b, "Stats", 4);
      Bulletins.AttribuerNoteMatiere(b, "Stats", 0800);

      b := Bulletins.Enregistrer(b, "Analyse");
      Bulletins.Ponderer(b, "Analyse", 3);
      Bulletins.LibererNoteMatiere(b, "Analyse");
      b := Bulletins.Enregistrer(b, "MCD");
      Bulletins.Ponderer(b, "MCD", 3);
      Bulletins.LibererNoteMatiere(b, "MCD");
      b := Bulletins.Enregistrer(b, "MCT");
      Bulletins.Ponderer(b, "MCT", 4);
      Bulletins.LibererNoteMatiere(b, "MCT");
   end test;

begin

   Bulletins.Io.Charger(b);
   --test(b);
   Bulletins.Io.Get("Saisie du bulletin", b);
   Bulletins.Io.Sauvegarder(b);


end adacalc16;
